local yingduan = fk.CreateSkill {
  name = "kq__yingduan",
}

Fk:loadTranslationTable{
  ["kq__yingduan"] = "英断",
  [":kq__yingduan"] = "出牌阶段限一次，你可以摸两张牌并将至少两张牌置于牌堆顶，然后若你因此失去的牌包含装备牌，你可以移动场上一张牌。",

  ["$kq__yingduan1"] = "",
  ["$kq__yingduan2"] = "",
}

yingduan:addEffect("active", {
  anim_type = "drawcard",
  can_use = function(self, player)
    return player:usedSkillTimes(yingduan.name) == 0
  end,
  target_num = 0,
  prompt = function(self,player)
    return "摸两张牌并将至少两张牌依次置于牌堆顶，然后失去牌包含装备牌则可以移动场上一张牌"
  end,
  card_filter = Util.FalseFunc,
  on_use = function(self, room, effect)
    local player = effect.from
    player:drawCards(2,yingduan.name)
    local card= room:askToChooseCards(player, {
        target = player,
        min = 2,
        max = 999,
        flag = "he",
        skill_name = yingduan.name
    })
    room:moveCardTo(card, Card.DrawPile, nil, fk.ReasonPut, yingduan.name)
    local yes = false
    for _, id in ipairs(card) do
        if Fk:getCardById(id).type == Card.TypeEquip then
            yes = true
        end
    end
    if yes then
        if #room:canMoveCardInBoard() > 0 then
            local targets = room:askToChooseToMoveCardInBoard(player, {
            prompt = "移动场上一张牌",
            skill_name = yingduan.name,
            cancelable = true,
        })
            if #targets == 2 then
                room:askToMoveCardInBoard(player, {
                  target_one = targets[1],
                  target_two = targets[2],
                  skill_name = yingduan.name,
                })
            end
        end
    end
  end
})

return yingduan
